package com.ruoyi.file.controller;

import com.ruoyi.common.resp.domain.R;
import com.ruoyi.file.api.dobbo.RemoteFileService;
import com.ruoyi.file.api.domain.SysFile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 文件请求处理
 *
 * @author ruoyi
 */
@RestController
public class SysFileController {

    @Autowired
    private RemoteFileService remoteFileService;

    /**
     * 文件上传请求
     */
    @PostMapping("upload")
    public R<SysFile> upload(MultipartFile file) {
        return remoteFileService.upload(file);
    }
}